function fetch() {
  const formData2 = new FormData();
  formData2.append("page", 1);
  formData2.append("rows", 30);
  const { data: res2 } = await this.$http.post("findProductCategoryByPage", formData2);
  // console.log(res2);
  if (res2.code != 0) return this.$message.error("获取商品分类失败！");

  const parentList = [];
  const childrenList = [];
  res2.data.forEach((item) => {
    const obj = {};
    obj.id = obj.value = item.id;
    obj.label = item.info_name;
    if (item.parent_id) {
      // 此时为子级
      obj.parent_id = item.parent_id;
      childrenList.push(obj);
    } else {
      // 此时为父级
      parentList.push(obj);
    }
  });
  parentList.forEach((item) => {
    childrenList.forEach((item2) => {
      if (item.id == item2.parent_id) {
        item2.parent_label = item.label;
        parentList.push(item2);
      }
    });
  });

  const formData = new FormData();
  formData.append("page", this.queryInfo.pagenum);
  formData.append("rows", this.queryInfo.pagesize);
  const { data: res } = await this.$http.post("findProductByPage", formData);
  console.log(res);
  if (res.code != "0") return this.$message("获取商品列表失败");

  res.data.result.forEach((item) => {
    parentList.forEach((item2) => {
      if (item.category_id == item2.id && item2.parent_id) {
        item.cateLabel = item2.parent_label + " / " + item2.label;
        item.parent_id = item2.parent_id;
      } else if (item.category_id == item2.id && !item2.parent_id) {
        item.cateLabel = item2.label;
      }
    });

    item.on_shelf = item.on_shelf == 1 ? "正常" : "关闭下单";
    let checkStatus;
    if (item.product_status == 0) checkStatus = "待审核";
    if (item.product_status == 1) checkStatus = "通过";
    if (item.product_status == 2) checkStatus = "未通过";
    item.product_status = checkStatus;
  });

  this.items = res.data.result;
  this.total = res.data.totalCount;
}